package config

type OrderSrvConfig struct {
	Name string `mapstructure:"name" json:"name"`
}

type GoodsSrvConfig struct {
	Name string `mapstructure:"name" json:"name"`
}

type InventorySrvConfig struct {
	Name string `mapstructure:"name" json:"name"`
}

type JWTInfo struct {
	SigningKey string `mapstructure:"key" json:"key"`
}

type RedisInfo struct {
	Host   string `mapstructure:"host" json:"host"`
	Port   int    `mapstructure:"port" json:"port"`
	Expire int    `mapstructure:"expire" json:"expire"`
}

type ServerConfig struct {
	Name               string             `mapstructure:"name" json:"name"`
	Port               int                `mapstructure:"port" json:"port"`
	OrderSrvInfo       OrderSrvConfig     `mapstructure:"order_srv" json:"order_srv"`
	GoodsSrvConfig     GoodsSrvConfig     `mapstructure:"goods_srv" json:"goods_srv"`
	InventorySrvConfig InventorySrvConfig `mapstructure:"inventory_srv" json:"inventory_srv"`
	JWTInfo            JWTInfo            `mapstructure:"jwt_info" json:"jwt_info"`
	RedisInfo          RedisInfo          `mapstructure:"redis_info" json:"redis_info"`
	ConsulInfo         ConsulInfo         `mapstructure:"consul_info" json:"consul_info"`
	MxshopDebug        bool               `mapstructure:"debug" json:"debug"`
	Host               string             `mapstructure:"host" json:"host"`
	Tags               []string           `mapstructure:"tags" json:"tags"`
}

type ConsulInfo struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type NacosInfo struct {
	Host        string `mapstructure:"host"`
	Port        uint64 `mapstructure:"port"`
	NamespaceId string `mapstructure:"namespace_id"`
	DataId      string `mapstructure:"data_id"`
	Group       string `mapstructure:"group"`
}
